

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>网站设置</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" href="/admin/layuiadmin/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="/admin/layuiadmin/style/admin.css" media="all">
</head>
<body>
<form class="layui-form" action="/admin/set/appsite" method="post">
	<div class="layui-fluid">
		<div class="layui-row layui-col-space15">
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-header">前端设置</div>
					<div class="layui-card-body">
						<div class="layui-form-item">
							<label class="layui-form-label">公司名称</label>
							<div class="layui-input-inline">
								<input type="text" name="app_company"  value="{if condition="isset($setres.app_company)"}{$setres.app_company}{/if}" placeholder="公司名称（必填项）" class="layui-input">
							</div>
							<div class="layui-form-mid layui-word-aux">某某公司</div>
						</div>

						<div class="layui-form-item">
							<label class="layui-form-label">平台logo</label>
							<div class="layui-input-inline">
								<input type="text" name="app_logoimg" value="{if condition="isset($setres.app_logoimg)"}{$setres.app_logoimg}{/if}"  placeholder="请上传图片" autocomplete="off" class="layui-input" >
								<img  id="img1" style="width:100px;">
							</div>
							<button style="float: left;" type="button" class="layui-btn" id="layuiadmin-upload-useradmin">上传图片</button>
						</div>

						<div class="layui-form-item">
							<label class="layui-form-label">APP/小程序名称</label>
							<div class="layui-input-inline">
								<input type="text" name="app_name"  value="{if condition="isset($setres.app_name)"}{$setres.app_name}{/if}" placeholder="APP/小程序名称" class="layui-input">
							</div>
							<div class="layui-form-mid layui-word-aux">APP或者小程序的名称</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">系统版本号</label>
							<div class="layui-input-inline">
								<input type="text" name="app_version"  value="{if condition="isset($setres.app_version)"}{$setres.app_version}{/if}" placeholder="系统版本号" class="layui-input">
							</div>
							<div class="layui-form-mid layui-word-aux">系统版本号</div>
						</div>

						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">系统域名</label>
							<div class="layui-input-inline">
								<input type="text" name="app_domainname"  value="{if condition="isset($setres.app_domainname)"}{$setres.app_domainname}{/if}" placeholder="系统域名" class="layui-input">
							</div>
							<div class="layui-form-mid layui-word-aux">当前系统请求的域名 如 https://www.xxx.com/</div>
						</div>

						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">是否开启介绍首页</label>
							<div class="layui-input-inline">
								<input type="checkbox" lay-filter="switch" lay-verify="required"  name="app_indexoff" value="1" 
									{if condition="isset($setres.app_indexoff) && $setres.app_indexoff==1"} checked {/if} lay-skin="switch" lay-text="启用|关闭">
							</div>
							<div class="layui-form-mid layui-word-aux">开启了则会显示首页介绍页面</div>
						</div>

						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">备案信息</label>
							<div class="layui-input-inline">
								<input type="text" name="web_keep"  value="{if condition="isset($setres.web_keep)"}{$setres.web_keep}{/if}" placeholder="备案号" class="layui-input">
							</div>
						</div>

						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">后台登录地址后缀</label>
							<div class="layui-input-inline">
								<input type="text" name="admin_address"  value="{if condition="isset($setres.admin_address)"}{$setres.admin_address}{/if}" placeholder="后台登录地址后缀" class="layui-input">
							</div>
							{if condition="config('-appsite.admin_address')"}
							<div class="layui-form-mid layui-word-aux">为了安全建议填写后缀 后台登录地址：<a style="color: blue" target="_blank" href="{:config('-appsite.app_domainname')?:'域名/'}admin/Login/index?key={:config('-appsite.admin_address')}">{:config('-appsite.app_domainname')?:'域名/'}admin/Login/index?key={:config('-appsite.admin_address')}</a> <span style="color: red;">请牢记你的后台登录地址</span></div>
							{else}
							<div class="layui-form-mid layui-word-aux">为了安全建议填写后缀 后台登录地址：<a style="color: blue" target="_blank" href="{:config('-appsite.app_domainname')?:'域名/'}admin/Login/index?key=ohyueo">{:config('-appsite.app_domainname')?:'域名/'}admin/Login/index?key=ohyueo</a> <span style="color: red;">请牢记你的后台登录地址</span></div>
							{/if}
						</div>

						<blockquote class="layui-elem-quote">商家信息</blockquote>
						<div class="layui-form-item">
                            <label class="layui-form-label">商家名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="mer_title"  value="{if condition="isset($setres.mer_title)"}{$setres.mer_title}{/if}" placeholder="商家名称" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">商家名称</div>
                        </div>

						<div class="layui-form-item">
                            <label class="layui-form-label">商家地址</label>
                            <div class="layui-input-inline">
                                <input type="text" name="mer_address"  value="{if condition="isset($setres.mer_address)"}{$setres.mer_address}{/if}" placeholder="商家地址" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">商家地址</div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">位置经纬度</label>
                            <div class="layui-input-inline">
                                <input type="text" name="mer_lat"  value="{if condition="isset($setres.mer_lat)"}{$setres.mer_lat}{/if}" placeholder="位置纬度" class="layui-input">
                            </div>
                            <div class="layui-input-inline">
                                <input type="text" name="mer_lng"  value="{if condition="isset($setres.mer_lng)"}{$setres.mer_lng}{/if}" placeholder="位置经度" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">用于前端导航和标记地图，小的是维度，大一点的是经度，如：30.645353,104.087116 维度应该是30.645353，经度应该是104.087116
                                <a target="_blank" href="https://lbs.qq.com/getPoint/">腾讯地图经纬度拾取</a></div>
                        </div>



						<div class="layui-form-item">
							<div class="layui-input-block">
								<input type="submit" class="layui-btn" value="确认保存">
							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
	</div>
</form>

<script src="/admin/layuiadmin/layui/layui.js"></script>
<script src="/admin/layuiadmin/jq/jquery.js"></script>
<script>
    layui.config({
        base: '/admin/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'upload','layedit'], function(){
        var $ = layui.$
            ,form = layui.form
            ,upload = layui.upload,layedit = layui.layedit;


        form.on('switch', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 1 : 0);
        });




        upload.render({
            elem: '#layuiadmin-upload-useradmin' //绑定元素
            ,url: "{:url('/admin/Index/upload')}" //上传接口
            ,ext: 'jpg|png|gif'//限制文件
            ,done: function(res){
                //上传完毕回调
                $(this.item).prev("div").children("input").val(res.filename);
                document.getElementById('img1').src = res.filename;
                layer.msg("上传成功");
            }
            ,error: function(){
                //请求异常回调
            }

        });


    })
</script>
</body>
</html>